package AI.Crew;

import java.awt.Graphics;
import java.io.IOException;
import java.net.URLClassLoader;

import javax.imageio.ImageIO;

import Main.SpaceGame;
import World.World;

public class Captain extends Crew
{
	
	public Captain(int x, int y,SpaceGame main, int health)
	{
		super(x,y, main, health);
		setPos(x,y);
		this.health = health;
		
		try {
			sprite = ImageIO.read(URLClassLoader.getSystemResource("Resources/"+"Captain.png"));
		}
		catch (IOException e) {
			e.printStackTrace();
		}
	}

	@Override
	public void draw(Graphics g) 
	{
		g.drawImage(sprite, getX()*10, getY()*10, null);
	}

	@Override
	public boolean getSolid(int x, int y) 
	{
		return main.world.tiles[x][y].isSolid();
	}

	@Override
	public int getWeight(int x, int y) 
	{
		return 1;
	}

	@Override
	public int getTileWidth() 
	{
		return World.worldXSize;
	}

	@Override
	public int getTileHeight() 
	{
		return World.worldYSize;
	}
	
}
